<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function getDisabledDates(disabledDates) {
                console.log('传入的数组', disabledDates);
                const newDisabledDates = [];
                const disabledSet = new Set(disabledDates);
                const today = new Date();
                let count = 0;
                let currentDate = new Date(today);
                while (count < 3) {
                    currentDate.setDate(currentDate.getDate() + 1);
                    const formattedDate = currentDate.toISOString().split('T')[0];
                    if (!disabledSet.has(formattedDate)) {
                        newDisabledDates.push(formattedDate);
                        count++;
                    }
                }
                let newArr = disabledDates.concat(newDisabledDates);
                newArr.sort((a, b) => new Date(a) - new Date(b));
                return newArr
            }
            const disabledDates = ["2023-07-21", "2023-07-22"];
            const newDisabledDates = getDisabledDates(disabledDates);
            console.log('返回新的禁用数组：', newDisabledDates);
    </script>
</body>
</html>